<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base target="center" />
    
    <title>订单管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<style type="text/css">
		h3{ margin-bottom:0px;
		margin-left:10px;}
		table{border-bottom:solid 2px #D1B4AB; text-align:center; width:80%; margin-top:25px; margin-left:20px;  border-collapse:collapse;}
		th{ border-top:solid 2px #D1B4AB; background-color:#EADDD9; height:30px; color:#925F50;}
		#top{ text-align:right; line-height:40px;}
		.a{ border:solid 1px #D1B4AB; height:40px;}
		#a1{ border-left:none;}
		#a2{ border-right:none;}
		#a3{ text-align:left; padding-left:5px;}
		.f{border: none; text-align: right;}
		em{color: red;}
		a:link{ text-decoration:none; color:#00F;}
		a:visited{ text-decoration:underline; color:#90C;}
		a:hover{ text-decoration:underline; color:#F60;}
		a:active{ text-decoration:underline; color:#900;}
		input[type="text"]{ height:23px; width:200px; line-height:23px; }
		input[type="button"]{ height:30px; width:50px; background-color:#036; color:#FFF; font-size:14px; border:none;}
	</style>

  </head>
  
  <body>
    <h3><img  src="img/adsa.png"/> 订单管理</h3>
	<hr size="2px" color="#FF9933" width="90%" align="left"/>
	<table>
    	<tr>
        	<td id="top" colspan="5" align="right"><b>订单号：</b><input type="text" maxlength="16" size="20"/>
            <b>订货人：<input type="text" maxlength="10"/><input type="button" value="查询" size="30"/></b>
            </td>
        </tr>
    	<tr>
        	<th width="100px">编号</th>
            <th width="70px">姓名</th>
            <th width="380px">发货地址</th>
            <th width="82px">状态</th>
            <th width="90px">操作</th>
        </tr>
        <c:forEach items="${sessionScope.list}" var="bc">
    	<tr>
        	<td class="a" id="a1">${bc.id }</td>
            <td class="a">${bc.userName }</td>
            <td class="a" id="a3">${bc.userAddress }</td>
            <td class="a">${bc.indentStatus }</td>
            <td class="a" id="a2"><a href="../MainServlet?option=update_q&ta=indent&thisID=${bc.id }">修改</a>&nbsp;&nbsp;
            <a href="../MainServlet?option=delete&ta=indent&thisID=${bc.id }&tpage=${sessionScope.tpage}">删除</a></td>
        </tr>
        </c:forEach>
        <tr><td class="f" colspan="5">
	    	<!-- 分页 -->
		    <b>共有大分类<em>${sessionScope.allUser }</em>个</b>&nbsp;&nbsp;
		    <b>当前为<em>${sessionScope.tpage }</em>/<em>${sessionScope.apage }</em>页</b>
		    <!-- 首页 -->
		    <a href="../MainServlet?option=select&ta=indent&tpage=1">首页</a>
		    <!-- 上一页 -->
		    <c:if test="${sessionScope.tpage>1 }">
				<a href="../MainServlet?option=select&ta=indent&tpage=${sessionScope.tpage-1 }">上一页</a>    
		    </c:if>
		    <!-- 遍历每一页 -->
		    <c:forEach begin="1" end="${sessionScope.apage}" var="pg">
		 		<a href="../MainServlet?option=select&ta=indent&tpage=${pg }">${pg }</a>   
		    </c:forEach>
		    <!-- 下一页 -->
		    <c:if test="${sessionScope.tpage<sessionScope.apage }">
				<a href="../MainServlet?option=select&ta=indent&tpage=${sessionScope.tpage+1 }">下一页</a>    
		    </c:if>
		    <!-- 尾页 -->
		    <a href="../MainServlet?option=select&ta=indent&tpage=${sessionScope.apage }">尾页</a>
	    </td></tr>
	</table>
	<c:remove var="list" scope="session"/>
  </body>
</html>
